<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>

<script type="text/javascript">

var [a, b, c] = [1, 2, 3];
console.error("a = " + a);
console.error("b = " + b);
console.error("c = " + c);
console.error("--------------------------");

let [foo, [[bar], baz]] = [1, [[2], 3]];
console.error("foo = " + foo);
console.error("bar = " + bar);
console.error("baz = " + baz);
console.error("--------------------------");

let [ , , third] = ["foo", "bar", "baz"];
console.error("third = " + third);
console.error("--------------------------");

let [x, , y] = [1, 2, 3];
console.error("x = " + x);
console.error("y = " + y);
console.error("--------------------------");

let [head, ...tail] = [1, 2, 3, 4];
console.error("head = " + head);
console.error("tail = " + tail);
console.error("tail.length = " + tail.length);
console.error("--------------------------");

</script>

</body>
</html>